<%@ Page Language="C#" MasterPageFile="~/admin/admin.master" AutoEventWireup="true" CodeFile="EditUser.aspx.cs" Inherits="admin_EditUser" Title="Edit Users" %>
<asp:Content ID="Content1" ContentPlaceHolderID="LinkPlaceHolder" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    User List:<br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="id"
        DataSourceID="ObjectDataSource1">
        <Columns>
            <asp:CommandField ShowEditButton="True" />
            <asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" ReadOnly="True"
                SortExpression="id" />
            <asp:BoundField DataField="user_login" HeaderText="user_login" SortExpression="user_login" />
            <asp:BoundField DataField="user_pass" HeaderText="user_pass" SortExpression="user_pass" />
            <asp:BoundField DataField="user_level" HeaderText="user_level" SortExpression="user_level" />
            <asp:BoundField DataField="user_is_active" HeaderText="user_is_active" SortExpression="user_is_active" />
            <asp:CommandField ShowDeleteButton="True" />
        </Columns>
    </asp:GridView>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete"
        InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetUserData"
        TypeName="dst_pbTableAdapters.pb_userTableAdapter" UpdateMethod="Update">
        <DeleteParameters>
            <asp:Parameter Name="Original_id" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="user_login" Type="String" />
            <asp:Parameter Name="user_pass" Type="String" />
            <asp:Parameter Name="user_level" Type="Int16" />
            <asp:Parameter Name="user_is_active" Type="Int16" />
            <asp:Parameter Name="Original_id" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="user_login" Type="String" />
            <asp:Parameter Name="user_pass" Type="String" />
            <asp:Parameter Name="user_level" Type="Int16" />
            <asp:Parameter Name="user_is_active" Type="Int16" />
        </InsertParameters>
    </asp:ObjectDataSource>
    &nbsp;
    <br />
    Add User:&nbsp;<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False"
        DataKeyNames="id" DataSourceID="ObjectDataSource1" DefaultMode="Insert" Height="50px"
        Width="125px">
        <Fields>
            <asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" ReadOnly="True"
                SortExpression="id" />
            <asp:BoundField DataField="user_login" HeaderText="user_login" SortExpression="user_login" />
            <asp:BoundField DataField="user_pass" HeaderText="user_pass" SortExpression="user_pass" />
            <asp:BoundField DataField="user_level" HeaderText="user_level" SortExpression="user_level" />
            <asp:BoundField DataField="user_is_active" HeaderText="user_is_active" SortExpression="user_is_active" />
            <asp:CommandField ShowInsertButton="True" />
        </Fields>
    </asp:DetailsView>
</asp:Content>

